<?
$cAbb = 'aap';
if ($cAbb=='') $cAbb = $_GET['catAbbreviation'];
$br = $_GET['bedrooms'];
$nb=139;
if ($nb=='')$nb = $_GET['neighborhood'];
$s = $_GET['s'];
?>

<form id="cr_form" action="get_cr_listing.php" method="get">

		<table width="100%" cellpadding="2" style="white-space: nowrap; background:#eee; border:1px solid gray;" summary="">
		<tr>
			<td align="right" width="1">search for:</td>
			<td width="30%"><input id="query" name="query" size="30" value="<?=$_GET['query']?>"> in:
	<select id="cAbb" name="catAbbreviation">

		<option value="ccc" <?if($cAbb=='ccc') echo 'selected';?>>all community
		<option value="eee" <?if($cAbb=='eee') echo 'selected';?>>all event
		<option value="sss" <?if($cAbb=='sss') echo 'selected';?>>all for sale / wanted
		<option value="ggg" <?if($cAbb=='ggg') echo 'selected';?>>all gigs
		<option value="hhh" <?if($cAbb=='hhh') echo 'selected';?>>all housing
		<option disabled value="">--
		<option value="aap" <?if($cAbb=='aap') echo 'selected';?>>   all apartments
		<option value="hsw" <?if($cAbb=='hsw') echo 'selected';?>>   all housing wanted
		<option value="nfa" <?if($cAbb=='nfa') echo 'selected';?>>   all no fee apts
		<option value="fee" <?if($cAbb=='fee') echo 'selected';?>>   apts broker fee
		<option value="nfb" <?if($cAbb=='nfb') echo 'selected';?>>   apts broker no fee
		<option value="abo" <?if($cAbb=='abo') echo 'selected';?>>   apts by owner

		<option value="aiv" <?if($cAbb=='aiv') echo 'selected';?>>   apts registration fee
		<option value="hou" <?if($cAbb=='hou') echo 'selected';?>>   apts wanted
		<option value="swp" <?if($cAbb=='swp') echo 'selected';?>>   housing swap
		<option value="off" <?if($cAbb=='off') echo 'selected';?>>   office &amp; commercial
		<option value="prk" <?if($cAbb=='prk') echo 'selected';?>>   parking &amp; storage
		<option value="rea" <?if($cAbb=='rea') echo 'selected';?>>   real estate - all
		<option value="reb" <?if($cAbb=='reb') echo 'selected';?>>   real estate - by broker

		<option value="reo" <?if($cAbb=='reo') echo 'selected';?>>   real estate - by owner
		<option value="rew" <?if($cAbb=='rew') echo 'selected';?>>   real estate wanted
		<option value="roo" <?if($cAbb=='roo') echo 'selected';?>>   rooms &amp; shares
		<option value="sha" <?if($cAbb=='sha') echo 'selected';?>>   rooms wanted
		<option value="sbw" <?if($cAbb=='sbw') echo 'selected';?>>   sublet/temp wanted
		<option value="sub" <?if($cAbb=='sub') echo 'selected';?>>   sublets &amp; temporary
		<option value="vac" <?if($cAbb=='vac') echo 'selected';?>>   vacation rentals

		<option disabled value="">--
		<option value="jjj" <?if($cAbb=='jjj') echo 'selected';?>>all jobs
		<option value="ppp" <?if($cAbb=='ppp') echo 'selected';?>>all personals
		<option value="res" <?if($cAbb=='res') echo 'selected';?>>all resume
		<option value="bbb" <?if($cAbb=='bbb') echo 'selected';?>>all services offered
	</select>
				<input type="submit" value="Search">
			</td><td>
				<label>
				<input type="checkbox" name="srchType" value="T" title="check this box to search only posting titles" <?if($_GET['srchType']=='T') echo checked;?>> only search titles
				</label>
			</td>
		</tr>

		<tr> <td align="right" width="1">rent:</td> <td>
			<input name="minAsk" size="6" value="<?=$_GET['minAsk']?>">&nbsp;
			<input name="maxAsk" size="6" value="<?=$_GET['maxAsk']?>">&nbsp;&nbsp;&nbsp;
		<select name="bedrooms"> 
			<option value=""  <?if($br=='') echo 'selected';?>>0+ BR 
			<option value="1" <?if($br=='1') echo 'selected';?>>1 BR
			<option value="2" <?if($br=='2') echo 'selected';?>>2 BR 
			<option value="3" <?if($br=='3') echo 'selected';?>>3 BR 
			<option value="4" <?if($br=='4') echo 'selected';?>>4 BR 
			<option value="5" <?if($br=='5') echo 'selected';?>>5 BR 
			<option value="6" <?if($br=='6') echo 'selected';?>>6 BR 
			<option value="7" <?if($br=='7') echo 'selected';?>>7 BR 
			<option value="8" <?if($br=='8') echo 'selected';?>>8 BR 
		</select>

	<select name="neighborhood">
		<option value="" <?if($nb=='') echo 'selected';?>>all neighborhoods
		<option value="120" <?if($nb=='120') echo 'selected';?>>Battery Park
		<option value="134" <?if($nb=='134') echo 'selected';?>>Chelsea
		<option value="160" <?if($nb=='160') echo 'selected';?>>Chinatown / Lit Italy
		<option value="121" <?if($nb=='121') echo 'selected';?>>Downtown
		<option value="159" <?if($nb=='159') echo 'selected';?>>East Harlem
		<option value="129" <?if($nb=='129') echo 'selected';?>>East Village
		<option value="122" <?if($nb=='122') echo 'selected';?>>Financial District
		<option value="133" <?if($nb=='133') echo 'selected';?>>Flatiron
		<option value="132" <?if($nb=='132') echo 'selected';?>>Gramercy
		<option value="127" <?if($nb=='127') echo 'selected';?>>Greenwich Village
		<option value="141" <?if($nb=='141') echo 'selected';?>>Harlem / Morningside
		<option value="140" <?if($nb=='140') echo 'selected';?>>Inwood / Wash Hts
		<option value="126" <?if($nb=='126') echo 'selected';?>>Lower East Side
		<option value="135" <?if($nb=='135') echo 'selected';?>>Midtown
		<option value="136" <?if($nb=='136') echo 'selected';?>>Midtown East
		<option value="137" <?if($nb=='137') echo 'selected';?>>Midtown West

		<option value="131" <?if($nb=='131') echo 'selected';?>>Murray Hill
		<option value="125" <?if($nb=='125') echo 'selected';?>>Nolita / Bowery
		<option value="124" <?if($nb=='124') echo 'selected';?>>SoHo
		<option value="123" <?if($nb=='123') echo 'selected';?>>TriBeCa
		<option value="130" <?if($nb=='130') echo 'selected';?>>Union Square
		<option value="139" <?if($nb=='139') echo 'selected';?>>Upper East Side
		<option value="138" <?if($nb=='138') echo 'selected';?>>Upper West Side
		<option value="128" <?if($nb=='128') echo 'selected';?>>West Village
	</select>
&nbsp;&nbsp;&nbsp;
				<label><input type="checkbox" name="addTwo"  value="purrr" <?if($_GET['addTwo']=='purrr') echo checked;?>>cats</label>
				<label><input type="checkbox" name="addThree" value="wooof" <?if($_GET['addThree']=='wooof') echo checked;?>>dogs</label>
</td>

			<td align="left"><label><input type="checkbox" name="hasPic" value="1" <?if($_GET['hasPic']==1) echo checked;?>> has image</label>
			
		<input name="s" value="0" style="display:none";>
			
			</td>
		</tr></table>
</form>